/**
 * Copyright (c) 2015-2020, wss 王山山
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.wss.conversion.config;

/**
 * 应用层的配置
 * 
 * @author wss
 *
 */
public class Main {
	/*
	 * 开发模式：true代表开发模式，false代表生产模式
	 */
	private boolean devMode = false;
	/*
	 * 视图类型：默认视图类型是jsp
	 */
	private String viewType = "jsp";
	/*
	 * 控制器所在的包，默认是controllers
	 */
	private String controllerPackage = "controllers";
	/*
	 * Model所在的包，默认是models
	 */
	private String modelPackage = "models";
	/*
	 * 全局拦截器所在的包
	 */
	private String interceptorPackage = "interceptors";
	/*
	 * handler所在的包
	 */
	private String handlerPackage = "handlers";
	/**
	 * plugin所在的包
	 */
	private String pluginPackage = "plugins";
	
	public Main() {}

	public Main(boolean devMode, String viewType, String controllerPackage, String modelPackage,
			String interceptorPackage, String handlerPackage, String pluginPackage) {
		super();
		this.devMode = devMode;
		this.viewType = viewType;
		this.controllerPackage = controllerPackage;
		this.modelPackage = modelPackage;
		this.interceptorPackage = interceptorPackage;
		this.handlerPackage = handlerPackage;
		this.pluginPackage = pluginPackage;
	}

	public boolean isDevMode() {
		return devMode;
	}

	public void setDevMode(boolean devMode) {
		this.devMode = devMode;
	}

	public String getViewType() {
		return viewType;
	}

	public void setViewType(String viewType) {
		this.viewType = viewType;
	}

	public String getControllerPackage() {
		return controllerPackage;
	}

	public void setControllerPackage(String controllerPackage) {
		this.controllerPackage = controllerPackage;
	}

	public String getModelPackage() {
		return modelPackage;
	}

	public void setModelPackage(String modelPackage) {
		this.modelPackage = modelPackage;
	}

	public String getInterceptorPackage() {
		return interceptorPackage;
	}

	public void setInterceptorPackage(String interceptorPackage) {
		this.interceptorPackage = interceptorPackage;
	}

	public String getHandlerPackage() {
		return handlerPackage;
	}

	public void setHandlerPackage(String handlerPackage) {
		this.handlerPackage = handlerPackage;
	}

	public String getPluginPackage() {
		return pluginPackage;
	}

	public void setPluginPackage(String pluginPackage) {
		this.pluginPackage = pluginPackage;
	}

	@Override
	public String toString() {
		return "Main [devMode=" + devMode + ", viewType=" + viewType + ", controllerPackage=" + controllerPackage
				+ ", modelPackage=" + modelPackage + ", interceptorPackage=" + interceptorPackage + ", handlerPackage="
				+ handlerPackage + ", pluginPackage=" + pluginPackage + "]";
	}
}
